<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>常见问题 - 流光小队</title>
    <link rel="stylesheet" href="../../css/style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        .faq-section {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        .faq-header {
            text-align: center;
            margin-bottom: 50px;
        }

        .faq-header h1 {
            font-size: 2.5em;
            color: #2d3748;
            margin-bottom: 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .faq-header p {
            font-size: 1.2em;
            color: #718096;
            max-width: 600px;
            margin: 0 auto;
        }

        .faq-search {
            max-width: 500px;
            margin: 0 auto 40px;
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #e2e8f0;
            border-radius: 25px;
            font-size: 1em;
            outline: none;
            transition: border-color 0.3s ease;
        }

        .search-input:focus {
            border-color: #667eea;
        }

        .search-btn {
            position: absolute;
            right: 5px;
            top: 5px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .search-btn:hover {
            transform: scale(1.05);
        }

        .faq-categories {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 50px;
        }

        .category-card {
            background: white;
            border-radius: 16px;
            padding: 30px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            border: 1px solid #e2e8f0;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }

        .category-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        }

        .category-icon {
            font-size: 3em;
            color: #667eea;
            margin-bottom: 20px;
        }

        .category-title {
            font-size: 1.3em;
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 10px;
        }

        .category-count {
            color: #718096;
            font-size: 0.9em;
        }

        .faq-list {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            border: 1px solid #e2e8f0;
        }

        .faq-item {
            border-bottom: 1px solid #e2e8f0;
            transition: all 0.3s ease;
        }

        .faq-item:last-child {
            border-bottom: none;
        }

        .faq-question {
            padding: 25px 30px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: white;
            transition: background-color 0.3s ease;
        }

        .faq-question:hover {
            background: #f7fafc;
        }

        .faq-question.active {
            background: #f7fafc;
        }

        .question-text {
            font-size: 1.1em;
            font-weight: 500;
            color: #2d3748;
            flex: 1;
            margin-right: 20px;
        }

        .question-icon {
            color: #667eea;
            font-size: 1.2em;
            transition: transform 0.3s ease;
        }

        .faq-question.active .question-icon {
            transform: rotate(180deg);
        }

        .faq-answer {
            padding: 0 30px;
            max-height: 0;
            overflow: hidden;
            transition: all 0.3s ease;
            background: #f7fafc;
        }

        .faq-answer.active {
            padding: 25px 30px;
            max-height: 500px;
        }

        .answer-text {
            color: #4a5568;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .answer-meta {
            display: flex;
            align-items: center;
            gap: 15px;
            font-size: 0.9em;
            color: #718096;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .meta-item i {
            color: #667eea;
        }

        .help-section {
            background: #f7fafc;
            border-radius: 16px;
            padding: 40px;
            margin-top: 50px;
        }

        .help-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .help-header h2 {
            font-size: 2em;
            color: #2d3748;
            margin-bottom: 10px;
        }

        .help-header p {
            color: #718096;
            font-size: 1.1em;
        }

        .help-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
        }

        .help-item {
            background: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            transition: transform 0.3s ease;
        }

        .help-item:hover {
            transform: translateY(-3px);
        }

        .help-icon {
            font-size: 2em;
            color: #667eea;
            margin-bottom: 15px;
        }

        .help-title {
            font-size: 1.2em;
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 10px;
        }

        .help-description {
            color: #718096;
            line-height: 1.5;
            margin-bottom: 15px;
        }

        .help-contact {
            color: #667eea;
            font-weight: 500;
            text-decoration: none;
        }

        .help-contact:hover {
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .faq-categories {
                grid-template-columns: 1fr;
            }

            .help-grid {
                grid-template-columns: 1fr;
            }

            .faq-question {
                padding: 20px;
            }

            .faq-answer.active {
                padding: 20px;
            }
        }
    </style>
</head>
<body>
    <!-- 侧边栏 -->
    <div class="sidebar" id="sidebar">
        <div class="sidebar-header">
            <h3>流光小队</h3>
            <button class="sidebar-toggle" onclick="toggleSidebar()">
                <i class="fas fa-times"></i>
            </button>
        </div>
        <nav class="sidebar-nav">
            <ul>
                <li>
                    <a href="../../index.html">
                        <i class="fas fa-home"></i>
                        首页
                    </a>
                </li>
                <li>
                    <a href="../about/index.html">
                        <i class="fas fa-info-circle"></i>
                        关于我们
                    </a>
                </li>
                
                <!-- 成员相关 -->
                <li>
                    <a href="../members/index.html">
                        <i class="fas fa-users"></i>
                        成员介绍
                    </a>
                </li>
                <li>
                    <a href="../excellent/index.html">
                        <i class="fas fa-star"></i>
                        优秀成员
                    </a>
                </li>
                
                <!-- 活动相关 -->
                <li>
                    <a href="../activities/upcoming.html">
                        <i class="fas fa-calendar-alt"></i>
                        活动预告
                    </a>
                </li>
                <li>
                    <a href="../activities/past.html">
                        <i class="fas fa-history"></i>
                        往期活动
                    </a>
                </li>
                <li>
                    <a href="../activities/calendar.html">
                        <i class="fas fa-calendar"></i>
                        活动日历
                    </a>
                </li>
                
                <!-- 成果与资源 -->
                <li>
                    <a href="../achievements/index.html">
                        <i class="fas fa-trophy"></i>
                        小组成果
                    </a>
                </li>
                <li>
                    <a href="../resources/index.html">
                        <i class="fas fa-book"></i>
                        学习资料
                    </a>
                </li>
                <li>
                    <a href="../resources/shares.html">
                        <i class="fas fa-share-alt"></i>
                        成员分享
                    </a>
                </li>
                
                <!-- 互动与讨论 -->
                <li>
                    <a href="../interaction/index.html">
                        <i class="fas fa-comments"></i>
                        互动交流
                    </a>
                </li>
                
                <!-- 加入与联系 -->
                <li>
                    <a href="../join/index.html">
                        <i class="fas fa-user-plus"></i>
                        加入我们
                    </a>
                </li>
                <li>
                    <a href="../contact/index.html">
                        <i class="fas fa-address-book"></i>
                        联系方式
                    </a>
                </li>
                
                <!-- 其他扩展 -->
                <li>
                    <a href="../partners/index.html">
                        <i class="fas fa-handshake"></i>
                        合作伙伴
                    </a>
                </li>
                <li class="active">
                    <a href="index.html">
                        <i class="fas fa-question-circle"></i>
                        常见问题
                    </a>
                </li>
            </ul>
        </nav>
    </div>

    <!-- 主内容区域 -->
    <div class="main-content">
        <!-- 顶部导航栏 -->
        <div class="topbar">
            <div class="topbar-left">
                <button class="menu-toggle" onclick="toggleSidebar()">
                    <i class="fas fa-bars"></i>
                </button>
                <h1>常见问题</h1>
            </div>
        </div>

        <!-- 内容区域 -->
        <div class="content">
            <div class="faq-section">
                <!-- 页面标题 -->
                <div class="faq-header">
                    <h1>常见问题</h1>
                    <p>解答您关于流光小队的疑问，快速找到所需信息</p>
                </div>

                <!-- 搜索框 -->
                <div class="faq-search">
                    <input type="text" class="search-input" placeholder="搜索问题..." id="searchInput">
                    <button class="search-btn" onclick="searchFAQ()">
                        <i class="fas fa-search"></i>
                    </button>
                </div>

                <!-- 问题分类 -->
                <div class="faq-categories">
                    <div class="category-card" onclick="filterByCategory('join')">
                        <div class="category-icon">👥</div>
                        <div class="category-title">加入相关</div>
                        <div class="category-count">8个问题</div>
                    </div>
                    <div class="category-card" onclick="filterByCategory('activity')">
                        <div class="category-icon">📅</div>
                        <div class="category-title">活动相关</div>
                        <div class="category-count">12个问题</div>
                    </div>
                    <div class="category-card" onclick="filterByCategory('tech')">
                        <div class="category-icon">💻</div>
                        <div class="category-title">技术相关</div>
                        <div class="category-count">15个问题</div>
                    </div>
                    <div class="category-card" onclick="filterByCategory('general')">
                        <div class="category-icon">❓</div>
                        <div class="category-title">一般问题</div>
                        <div class="category-count">10个问题</div>
                    </div>
                </div>

                <!-- FAQ列表 -->
                <div class="faq-list" id="faqList">
                    <!-- FAQ项目将通过JavaScript动态生成 -->
                </div>

                <!-- 帮助信息 -->
                <div class="help-section">
                    <div class="help-header">
                        <h2><i class="fas fa-life-ring"></i> 需要更多帮助？</h2>
                        <p>如果这里没有找到您需要的答案，可以通过以下方式联系我们</p>
                    </div>
                    <div class="help-grid">
                        <div class="help-item">
                            <div class="help-icon">📧</div>
                            <div class="help-title">发送邮件</div>
                            <div class="help-description">通过邮件详细描述您的问题，我们会尽快回复</div>
                            <a href="mailto:support@example.com" class="help-contact">support@example.com</a>
                        </div>
                        <div class="help-item">
                            <div class="help-icon">💬</div>
                            <div class="help-title">在线咨询</div>
                            <div class="help-description">加入我们的QQ群或微信群，与团队成员直接交流</div>
                            <a href="#" class="help-contact" onclick="alert('QQ群：123456789\n微信群：扫描二维码加入')">查看群号</a>
                        </div>
                        <div class="help-item">
                            <div class="help-icon">📞</div>
                            <div class="help-title">电话联系</div>
                            <div class="help-description">工作时间拨打我们的电话，获得即时帮助</div>
                            <a href="tel:138-0000-0000" class="help-contact">138-0000-0000</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // FAQ数据
        const faqs = [
            {
                id: 1,
                category: "join",
                question: "如何加入流光小队？",
                answer: "加入流光小队需要经过以下步骤：1. 填写报名表单；2. 初步筛选；3. 面试交流；4. 正式加入。具体流程请查看"加入我们"页面。",
                author: "管理员",
                date: "2023-12-01",
                views: 1500
            },
            {
                id: 2,
                category: "join",
                question: "加入流光小队有什么要求？",
                answer: "主要要求包括：对科技创新有浓厚兴趣、具备良好的团队协作能力、有相关技术基础或学习热情、能够积极参与团队活动、遵守团队规章制度。",
                author: "管理员",
                date: "2023-12-01",
                views: 1200
            },
            {
                id: 3,
                category: "activity",
                question: "如何参加团队活动？",
                answer: "团队活动会在"活动预告"页面发布，您可以查看活动详情并在线报名。部分活动需要提前报名，请关注活动通知。",
                author: "活动负责人",
                date: "2023-11-30",
                views: 800
            },
            {
                id: 4,
                category: "activity",
                question: "活动是否收费？",
                answer: "大部分团队活动都是免费的，包括技术分享会、工作坊等。少数特殊活动可能会收取少量费用，具体会在活动通知中说明。",
                author: "活动负责人",
                date: "2023-11-30",
                views: 600
            },
            {
                id: 5,
                category: "tech",
                question: "团队主要研究哪些技术领域？",
                answer: "团队主要研究领域包括：人工智能与机器学习、Web开发与前端技术、移动应用开发、数据科学与分析、物联网技术等。",
                author: "技术总监",
                date: "2023-11-29",
                views: 900
            },
            {
                id: 6,
                category: "tech",
                question: "如何获取学习资料？",
                answer: "团队的学习资料在"学习资料"页面提供，包括书籍推荐、课程课件、技术文章等。成员可以免费下载使用。",
                author: "技术总监",
                date: "2023-11-29",
                views: 1100
            },
            {
                id: 7,
                category: "general",
                question: "团队的活动时间安排？",
                answer: "团队活动通常在周末或晚上进行，具体时间会在活动通知中公布。重要活动会提前一周通知，请关注相关消息。",
                author: "管理员",
                date: "2023-11-28",
                views: 700
            },
            {
                id: 8,
                category: "general",
                question: "如何联系团队成员？",
                answer: "您可以通过"联系方式"页面查看团队的联系信息，包括邮箱、电话、QQ群、微信群等。建议优先使用QQ群或微信群进行交流。",
                author: "管理员",
                date: "2023-11-28",
                views: 500
            }
        ];

        let currentCategory = 'all';
        let currentSearch = '';

        function toggleSidebar() {
            const sidebar = document.getElementById('sidebar');
            sidebar.classList.toggle('open');
        }

        function filterByCategory(category) {
            currentCategory = category;
            renderFAQ();
        }

        function searchFAQ() {
            currentSearch = document.getElementById('searchInput').value.toLowerCase();
            renderFAQ();
        }

        function toggleFAQ(id) {
            const answer = document.querySelector(`[data-faq-id="${id}"] .faq-answer`);
            const question = document.querySelector(`[data-faq-id="${id}"] .faq-question`);
            
            // 关闭其他打开的FAQ
            document.querySelectorAll('.faq-answer.active').forEach(item => {
                if (item !== answer) {
                    item.classList.remove('active');
                    item.previousElementSibling.classList.remove('active');
                }
            });
            
            // 切换当前FAQ
            answer.classList.toggle('active');
            question.classList.toggle('active');
        }

        function renderFAQ() {
            const list = document.getElementById('faqList');
            let filteredFAQs = faqs;
            
            // 按分类筛选
            if (currentCategory !== 'all') {
                filteredFAQs = filteredFAQs.filter(faq => faq.category === currentCategory);
            }
            
            // 按搜索关键词筛选
            if (currentSearch) {
                filteredFAQs = filteredFAQs.filter(faq => 
                    faq.question.toLowerCase().includes(currentSearch) ||
                    faq.answer.toLowerCase().includes(currentSearch)
                );
            }
            
            list.innerHTML = filteredFAQs.map(faq => `
                <div class="faq-item" data-faq-id="${faq.id}">
                    <div class="faq-question" onclick="toggleFAQ(${faq.id})">
                        <div class="question-text">${faq.question}</div>
                        <div class="question-icon">
                            <i class="fas fa-chevron-down"></i>
                        </div>
                    </div>
                    <div class="faq-answer">
                        <div class="answer-text">${faq.answer}</div>
                        <div class="answer-meta">
                            <div class="meta-item">
                                <i class="fas fa-user"></i>
                                <span>${faq.author}</span>
                            </div>
                            <div class="meta-item">
                                <i class="fas fa-calendar"></i>
                                <span>${faq.date}</span>
                            </div>
                            <div class="meta-item">
                                <i class="fas fa-eye"></i>
                                <span>${faq.views}次查看</span>
                            </div>
                        </div>
                    </div>
                </div>
            `).join('');
        }

        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', function() {
            renderFAQ();
            
            // 设置当前页面的导航项为激活状态
            document.querySelectorAll('.sidebar-nav li').forEach(li => {
                li.classList.remove('active');
            });
            document.querySelector('.sidebar-nav li:nth-child(16)').classList.add('active');
        });
    </script>
</body>
</html> 